|
|
Slime wrote:
>To turn an image into a height field mesh, you must sample the image at each
>pixel and interpret the color as a height value. Then you place triangles in
>the correct places so that their vertices are at the heights of
>corresponding pixels.
>
>If you're writing the macro to sample the image, ...
You can write macros to sample images? Great. How do I learn to do that?
Fine, I'll write a macro to make meshes... I didn't know macros could read
picture files. I thought they could only read text files.
>then you can do whatever
>you want with the height values. You can wrap the image around a cylinder
>shape if you want.
I want to do more than that. I wan to blob them and add them together like
you do with an isosurface.
>Turning an isosurface into a mesh is harder, as people have mentioned,
>'cause you're trying to turn a 3D function into a 2D surface.
>
>> Great... but is there a way to output a mesh?
>
>You can cause a mesh to be parsed by using the mesh or mesh2 syntax, in this
>case in conjunction with macros and while loops.
Maybe you can... but I don't have a clue. Where do I learn to write macros
that can read image files like jpeg and gif and png?
>If you want to output the
>mesh so that you can read it in later, you can use the #fopen and #write and
>#fclose directives. (All these are in the documentation.)
I read over that briefly, but I came away with the impression that only text
files could be read. You can read image files?
>
>> There should be... and POV should read compressed mesh files without
>having
>> to go through a macro.
>
>I'm not sure what you mean by "compressed mesh files." POV-Ray can read its
>own mesh type. If you want to know why it doesn't read other types of meshes
>(.obj for instance), check the documentation, it's somewhere in the FAQ
>(section 9 i think).
>
> - Slime
>
normdoering
Post a reply to this message
|
|